#include"mystdio.h"



int main()
{
  myFILE* fp=my_fopen("log.txt","w");
  const char* msg="hello world";
  char buf[123];
  int cnt=5;
  while(cnt)
  {
    sprintf(buf,"%s-%d",msg,cnt);
    //printf("%s\n",buf);
    my_fwrite(fp,buf,strlen(buf));
    cnt--;
    sleep(2);
  }

  my_fclose(fp);

  return 0;
}






